Skip to content

docs: MaxDrawdown warms up over period and updates in amortised O(1) - #126

Merged
kingchenc merged 1 commit into
mainfrom
docs/max-drawdown-warmup-and-cost
Oct 28, 2026
Merged

kingchenc merged 1 commit into
mainfrom
docs/max-drawdown-warmup-and-cost

Conversation

@kingchenc

Copy link
Copy Markdown
Contributor

The MaxDrawdown page, its overview row and the warmup table gave a warmup of 1. MaxDrawdown returns None until the window holds period values, so the streaming example, which unwrapped update, would panic during that warmup.

The cost note described a deque that never made update O(1). Since wickra #493 the indicator keeps the window's running peaks together with the low of each segment, and the page now explains how.

The edge cases cite the unit tests that pin them, including the non-positive peak and the non-finite input.

The cost text describes the amortised update from wickra #493, so this merges after the next wickra release.

The page, the overview row and the warmup table gave a warmup of 1;
MaxDrawdown returns None until the window holds period values. The
streaming example unwrapped update and would panic during that warmup.
The cost note described a deque that never made update O(1); the
indicator now keeps the window's running peaks with the low of each
segment, and the page says how. The edge cases cite the unit tests that
pin them, including the non-positive peak and non-finite input.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Deploying wickra-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8f461a0
Status: ✅  Deploy successful!
Preview URL: https://c79744ce.wickra-docs.pages.dev
Branch Preview URL: https://docs-max-drawdown-warmup-and.wickra-docs.pages.dev

View logs

@kingchenc
kingchenc merged commit 36f5b99 into main Oct 28, 2026
8 checks passed
@kingchenc
kingchenc deleted the docs/max-drawdown-warmup-and-cost branch October 28, 2026 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant